
%Create tab group
handles.tgroup = uitabgroup('Parent', handles.figure1,'TabLocation', 'top');
handles.tab1 = uitab('Parent', handles.tgroup, 'Title', 'User Input');
handles.tab2 = uitab('Parent', handles.tgroup, 'Title', 'Pressure Data');
handles.tab3 = uitab('Parent', handles.tgroup, 'Title', 'Flow Data');
handles.tab4 = uitab('Parent', handles.tgroup, 'Title', 'Impedance Data');
handles.tab5 = uitab('Parent', handles.tgroup, 'Title', 'Flow and Pressure');

%Place panels into each tab
set(handles.P1,'Parent',handles.tab1)
set(handles.P2,'Parent',handles.tab2)
set(handles.P3,'Parent',handles.tab3)
set(handles.P4,'Parent',handles.tab4)
set(handles.P5,'Parent',handles.tab5)

%Reposition each panel to same location as panel 1
set(handles.P2,'position',get(handles.P1,'position'));
set(handles.P3,'position',get(handles.P1,'position'));
set(handles.P4,'position',get(handles.P1,'position'));
set(handles.P5,'position',get(handles.P1,'position'));